package Ep01_String.Offer_20;

/**
 * @author Jimmy Zhan WORKSTATION
 * @since 2023/7/12 10:56
 * 说明：正则表达式方法
 */

public class Regular {
    public boolean isNumber(String s) {
        String regex = "^[+-]?((\\d+\\.?)|(\\d*\\.?\\d+))([eE][+-]?\\d+)?$";
        return s.trim().matches(regex);
    }
}
